package com.baweiwei.goodapi;

import com.baweiwei.common.entity.Good;
import com.baweiwei.goodapi.dao.GoodDao;
import com.baweiwei.goodapi.service.GoodService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class GoodTestApp {
    @Autowired
    private GoodService goodService;

    @Test
    public void test_findAll(){
        int i = goodService.updateKunCun(1, 95);
        if(i>0){
            System.out.println("更新库存成功");
        }else{
            System.out.println("更新库存失败");
        }
    }

}
